package com.qyer.search.storm.util;

import java.io.Serializable;

/**
 * Created by tangzheng on 16/1/10.
 */
public class Country implements Serializable {
  private int id;
  private String country;

  public Country() {
  }

  public Country(int id, String city){
    this.id = id;
    this.country = city;
  }

  public String getCountry() {
    return country;
  }

  public void setCountry(String country) {
    this.country = country;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  @Override public String toString() {
    return "Country{" +
      "id=" + id +
      ", country='" + country + '\'' +
      '}';
  }

  @Override public boolean equals(Object o) {
    if (this == o)
      return true;
    if (o == null || getClass() != o.getClass())
      return false;

    Country country1 = (Country) o;

    if (id != country1.id)
      return false;
    return !(country != null ? !country.equals(country1.country) : country1.country != null);

  }

  @Override public int hashCode() {
    int result = id;
    result = 31 * result + (country != null ? country.hashCode() : 0);
    return result;
  }
}